// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 测试问题紧急等级类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-04-02
 */
public enum SeverityLevelEnum {
    SLIGHT(1, "轻微"),
    COMMONLY(2, "一般"),
    URGENT(3, "严重"),
    DEADLY(4, "致命");

    private int value;

    private String name;

    SeverityLevelEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        SeverityLevelEnum arrObj[] = SeverityLevelEnum.values();
        for (SeverityLevelEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
